﻿using System;
using System.Collections.Generic;
using System.Text;
using Xeno.Core;
using OpenTK;

using OpenTK.Graphics.OpenGL;
using System.Drawing;
using OpenTK;
namespace Xeno.GUI
{
    public class XuiDesktop : XuiWidget
    {
        public XuiDesktop()
            : base(new Vector2(XenoCore.DisplayWidth, XenoCore.DisplayHeight))
        {

        }
        public override void DoRender()
        {

            Begin2D();

            GL.Color4(Color.Silver);

            GL.Begin(BeginMode.Quads);

            GL.Vertex2(Attached.WorldPosition.X, Attached.WorldPosition.Y);
            GL.Vertex2(Attached.WorldPosition.X + Size.X, Attached.WorldPosition.Y);

            GL.Color4(Color.WhiteSmoke);
            
            GL.Vertex2(Attached.WorldPosition.X + Size.X, Attached.WorldPosition.Y + Size.Y);
            GL.Vertex2(Attached.WorldPosition.X, Attached.WorldPosition.Y + Size.Y);


            GL.End();

            End2D();

          
        }

    }
}
